package com.example.marcus.tokentest;

import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

/**
 * Created by Marcus on 2015/5/10.
 */
public class TabFragment extends Fragment {
    private String message = "default";

    public static final String TITLE = "title";

    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        if (getArguments() != null) {
            this.message = getArguments().getString(TITLE);
        }

        TextView tv = new TextView(getActivity());
        tv.setText(message);
        tv.setTextSize(20);
        tv.setBackgroundColor(Color.parseColor("#cccccccc"));
        tv.setGravity(Gravity.CENTER);

        return tv;
    }

}
